<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
		
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

	<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>校园环境卫生与设施故障管理</title>
		<%@ include file="../com.jsp"%>
		<script type="text/javascript">
		function check() {
  			var o = ${user.password};
			if(document.form1.old.value != o){
			    alert("输入的原始密码错误!");
			    document.form1.old.value="";
			    document.form1.old.focus();
			    return false;
			}
			if(document.form1.newpwd.value == ""){
			    alert("输入的新密码不能为空");
			    document.form1.newpwd.focus();
			    return false;
			}
			if(document.form1.confirm.value != document.form1.newpwd.value){
			    alert("两次输入的密码不一致");
			    document.form1.confirm.value="";
			    document.form1.confirm.focus();
			    return false;
			}
			return true;
		}
		</script>
	</head>
	<body>
		<div class="alert alert-info"> 
			修改个人密码 
		</div>
		<form name="form1" action="user_bupdate.action" method="post"
			enctype="multipart/form-data">
			<input name="user.id" value="${user.id}" type="hidden" />
			<table
				class="table table-striped table-bordered table-condensed">
				<thead>
					<tr>
						<td colspan="4">
							<b>修改个人密码</b>
						</td>
					</tr>
				</thead>
				<tbody>
				<tr>
						<td>
						原密码
						</td>
						<td colspan="3">
							<input id="old" type="password" />
						</td>
					</tr>
					<tr>
						<td>
						新密码
						</td>
						<td colspan="3">
							<input name="user.password" id ="newpwd" type="password"/>
						</td>
					</tr>
					<tr>
						<td>
						确认密码
						</td>
						<td colspan="3">
							<input id ="confirm" type="password"/>
						</td>
					</tr>
					
				</tbody>
				<tfoot>
					<tr>
						<td colspan="4">
								<input class="btn btn-inverse" id="find" type="submit"
									value="修改" onClick="return check();"/>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="btn btn-inverse" type="reset" value="取消" />
						</td>
					</tr>
				</tfoot>
			</table>
		</form>
	</body>
</html>